import requests

herderdata = {"Content-Type":"application/json"}
jsonData = {"mobile":"13800000002","password":"123456"}
resp = requests.post(url='http://ihrm2-test.itheima.net/api/sys/login',
                     headers=herderdata,
                     json=jsonData)
print(resp.json())
# 断言接口响应数据
assert 200 == resp.status_code
assert True == resp.json()['success']
assert 10000 == resp.json()['code']
assert '成功' in resp.json()['message']